//
//  NRWBuyCarPriceHeaderView.m
//  NRWMall
//
//  Created by 邢毅 on 2018/6/13.
//  Copyright © 2018年 com.anpxd. All rights reserved.
//

#import "NRWBuyCarPriceHeaderView.h"

@implementation NRWBuyCarPriceHeaderView
{
    UILabel *_mDetailLabel;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UILabel *oneLabel = [[UILabel alloc] init];
        oneLabel.textColor = mainFontColor();
        oneLabel.font = getThemeFont(16);
        oneLabel.text = @"价格";
        oneLabel.frame = CGRectMake(16, 0, 32, 15);
        
        UILabel *twoLabel = [[UILabel alloc] init];
        twoLabel.textColor = subFontColor();
        twoLabel.font = getThemeFont(12);
        twoLabel.text = @"/单位:万";
        twoLabel.frame = CGRectMake(oneLabel.viewMaxX + 6, 0, 49, 15);
        
        UIView *lineView = [[UIView alloc] init];
        lineView.backgroundColor = getColor(@"#CCCCCC");
        lineView.frame = CGRectMake(twoLabel.viewMaxX + 10, 2.5, 0.5, 10);
        
        _mDetailLabel = [[UILabel alloc] init];
        _mDetailLabel.textColor = mainFontColor();
        _mDetailLabel.font = getThemeFont(13);
        _mDetailLabel.text = @"不限";
        _mDetailLabel.frame = CGRectMake(lineView.viewMaxX + 8, 0, 100, 15);
        
        [self addSubview:oneLabel];
        [self addSubview:twoLabel];
        [self addSubview:lineView];
        [self addSubview:_mDetailLabel];
    }
    return self;
}

- (void)setDetailString:(NSString *)detailString {
    
    _detailString = detailString;
    
    _mDetailLabel.text = detailString;
}

@end
